We employ a laboratory experiment to investigate the effects of environmental context and termination uncertainty on decisions in a dynamic game with a public bad. Every period the subjects decide on their own production level that generates private revenue and ‘emissions’. Emissions accumulate over time and act as a public bad. We characterize and use as benchmarks the Markov perfect equilibrium and social optimum and find that observed decisions are between the two predictions. We find no significant effect of termination uncertainty on decisions in any except the last few rounds where, in a fixed-end setting, subjects allocate their entire endowment to production. We find a strong effect of environmental context which partially substitutes for experience. The effect of experience is most pronounced in the fixed-end treatment where production allocations and the level of the public bad become lower after the restart.